package com.example.demo1103.demo2;
public class Test {
    public static void main(String[] args) {
        SumOver sunOver=(arr)->{
            int sum=0;
            for (int i : arr) {
                sum+=i;
            }
            System.out.println(sum);
            return sum;
        };
        fun(sunOver);
    }
    public static void fun(SumOver over){
        int arr[]={1,2,3,4,5,5};
        over.sum(arr);
    }
}
interface SumOver{
    int  sum(int arr[]);
}
